import time
import math
import sys

import UE4CtrlAPI as UE4CtrlAPI


#Create a new MAVLink communication instance, UDP sending port (CopterSim’s receving port) is 20100
ue = UE4CtrlAPI.UE4CtrlAPI()
time.sleep(0.5)

# sendUE4Cmd: RflySim3D API to modify scene display style
# ue.sendUE4Cmd('RflyChangeMapbyName VisionRing',0)
# time.sleep(0.5)
# ue.sendUE4Cmd('RflyChangeMapbyName VisionRingBlank',1)
# time.sleep(2)

args = sys.argv[1:]
ue.sendUE4Pos(int(args[0]), int(args[1]), 0, [float(args[2]), float(args[3]), float(args[4])], [float(args[5]), float(args[6]), float(args[7])])
# ue.sendUE4Pos(1005,2150,0,[14,0.388, -11.465],[0,0,0])
# ue.sendUE4Pos(1001,2150,0,[43.943,1.620, -11.465],[0,0,0])
# ue.sendUE4Pos(1002,1150,0,[72.946,-4.388,-11.465],[0,0,0])
# ue.sendUE4Pos(1003,151,0,[115.915,5.510,- 10.448],[0,0,0])


